package com.ktjy.dao;

import com.ktjy.dao.impl.IntermediaryMetgodInterceptor;
import net.sf.cglib.proxy.Enhancer;

public class IntermediaryCgilbProxyFactory {
    private static IntermediaryMetgodInterceptor callback=new IntermediaryMetgodInterceptor();
    public static <T> T create(Class<T> target){
        Enhancer  enhancer=new Enhancer();
        enhancer.setCallback(callback);
        enhancer.setSuperclass(target);
        return (T) enhancer.create();
    }
}